package cn.e2win.biz.security;

import java.util.Map;

import javax.servlet.http.HttpSessionAttributeListener;
import javax.servlet.http.HttpSessionBindingEvent;

public class SessionListener implements HttpSessionAttributeListener {  
     
		@Override
		public void attributeRemoved(HttpSessionBindingEvent event) {
            if ("USER".equals(event.getName())) {  
                System.err.println("REMOVED===" + event.getName() + "=====" + event.getValue());
                Integer userId = (Integer)((Map)event.getValue()).get("id");
            	//UserSession.removeUser(userId);
            }
		}

		@Override
	   public void attributeAdded(HttpSessionBindingEvent event) {
        }  


		@Override
        public void attributeReplaced(HttpSessionBindingEvent event) {  
	    }

    }  